import Vue from 'vue';
import VueRouter from 'vue-router';
import Home from '../src/components/tabBar/Home.vue'
import Member from '../src/components/tabBar/Member.vue'
import Search from '../src/components/tabBar/Search.vue'
import ShopCar from '../src/components/tabBar/ShopCar.vue'
import NewsList from '../src/components/news/NewsList.vue'
import NewsInfo from '../src/components/news/NewsInfo.vue'
import PhotoLost from '../src/components/photos/PhotoList.vue'
import PhotoInfoLost from '../src/components/photos/PhotoInfo.vue'
import GoodsList from '../src/components/goods/GoodsList.vue'
import GoodsInfo from '../src/components/goods/GoodInfo.vue'
import GoodsDesc from '../src/components/goods/GoodsDesc.vue'
import GoodsComment from '../src/components/goods/GoodsComment.vue'

Vue.use(VueRouter);
export default new VueRouter({
    routes: [
        //路由重定向
        { path: '/', redirect: "/home" },
        { path: '/home', component: Home },
        { path: '/member', component: Member },
        { path: '/search', component: Search },
        { path: '/shopcar', component: ShopCar },
        { path: '/home/newsList', component: NewsList },
        { path: '/home/newsinfo/:id', component: NewsInfo },
        { path: '/home/photolist', component: PhotoLost },
        { path: '/home/photoinfo/:id', component: PhotoInfoLost },
        { path: '/home/goodslist', component: GoodsList },
        { path: '/home/goodsinfo/:id', component: GoodsInfo, name: 'goodsinfo' },
        { name: 'goodsdesc', path: '/home/goodsdesc', component: GoodsDesc },
        { name: 'goodscomment', path: '/home/goodscomment', component: GoodsComment }
    ],
    linkActiveClass: 'mui-active' // 默认覆盖的类叫 router-link-acrive  

})